Skip to content

feat(mobile): experiment with v5 stacks and native iPad columns - #12646

Closed
juliusmarminge wants to merge 22 commits into
mainfrom
mobile/rns-v5-migration
Closed

juliusmarminge wants to merge 22 commits into
mainfrom
mobile/rns-v5-migration

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Our current iPad workspace simulates columns in React and depends on a large react-native-screens header patch. This draft moves iPhone navigation to v5 stacks and the iPad workspace to native split-column stacks, with Duo in #12648 above it.

It builds on the Expo 58.0.0 / React Native 0.88 RC3 stack ending at #12052. RNS consumes react-native-screens-5.0.0-t3.2.tgz, built from our versioned fork tag at b728d8ad7. The fork mirrors upstream main and combines the split-column prototype from #4666 with our eleven upstream proposals and the remaining integration changes. The published v5 alpha still lacks this split navigator.

  • Keep React Navigation 7's router, static screen definitions, linking, and application callbacks. Render pushes with v5 Stack.Host and Stack.Screen; retain outgoing descriptors until native dismissal completes.
  • Let UIKit own iPad primary, detail, and inspector columns, insets, and sidebar animation. The sidebar inset uses the darker drawer color; the frame and conversation use the lighter screen color. Settings and filters stay at the top, search sits below them, and there is no iPad bottom toolbar.
  • Keep the iPhone's native filter/search/compose bottom toolbar. Translate existing screen options into the neutral v5 header API, including native menu state, search placement, and appearance colors. The old iOS header/search/toolbar implementation is removed; a presentation-only legacy wrapper remains for sheets.
  • Register the real thread-list ScrollView through v5's ScrollViewMarker. Use native column measurements for top clearance. Both FlatList and LegendList keep rows below the header at rest, and Android retains its existing scroll view behavior.
  • Use UIKit's automatic scroll-edge effect on iOS 26 and 27. Port main's native title-geometry compatibility fix into RNS v5's custom title/subtitle wrappers so UIKit recognizes Fabric header content. The effect samples scrolling content beneath the title. The forced bar material and added blur binding are removed. This is a generic RNS custom-header fix, with no application-specific option.
  • Resize markdown during native column layout and give Files loading and terminal Back controls a single owner.

All Screens changes now live in the fork integration branch; the separate 663-line pnpm patch is removed. The fork builds JavaScript, declarations and native source with yarn pack:t3 <output-directory>. The app commits the resulting tarball, and its embedded t3-fork.json records the exact source commit and upstream base. The update procedure is in mobile-screens-fork.md.

Package validation: clean installs and shared/Duo mobile typechecks pass, along with 32 focused navigation/geometry tests. Two independent checkouts produce byte-identical tarballs. All 871 shipped runtime/native source files, codegen configuration and runtime dependencies match the previous patched package. This packaging change was not rebuilt natively. The preceding Expo 58.0.0 refresh passed a fresh Xcode 27.1 build and cached conversation, fold/reopen, draft retention and unfolded split-keyboard smoke checks. Fresh pairing, folded keyboard layout, sheets, inspector transitions, iPad multitasking and Android builds still need verification.

Expo 58.0.0 Duo smoke check with cached fixture data:

Expo 58.0.0 native columns on Duo

Before — existing iPad workspace on the Expo base:

Before: existing iPad workspace

After — native v5 columns with the corrected sidebar background, top controls, search, and preserved draft:

After: v5 native iPad workspace with the selected conversation and draft

Native Files inspector with the screen background:

Native iPad primary, conversation, and Files inspector columns

Earlier sidebar collapse/expand recording with keyboard and draft retained. This recording invokes the existing sidebar button callback through CDP; UIKit performs the column transition. It is not evidence of a physical touch test.

iOS 27 automatic scroll-edge effect: before and after

Before, the forced bar material hid content beneath the title:

Before: forced navigation-bar material on iOS 27

After, UIKit's automatic effect samples content beneath the custom title:

After: iOS 27 automatic scroll-edge blur beneath the custom title

At rest:

Transparent native header at the top of the thread list

Automatic scroll-edge rendering while the list scrolls. The recording uses the existing list scroll API through CDP.

Native bottom search filtering to one seeded thread

Native filter menu without the keyboard

Fresh iOS 26 iPad client: automatic native sidebar fade

iOS 26 automatic sidebar fade and native top controls

Files loading and terminal Back: before and after

Before: duplicate loading indicators in the Files inspector:

Before: two loading indicators in the Files inspector

After: one loader in the Files inspector:

After: a single Files inspector loader

Before: two terminal Back buttons:

Before: duplicated terminal Back buttons

After: one terminal Back button beside the sidebar control:

After: a single terminal Back button beside the sidebar control

The after captures use a cached disconnected fixture to keep the initial loading state visible. The terminal Back was exercised through a native tap.

Rebased onto the latest Expo-only #12052 head, 06dcb14514e. Mobile typecheck and 27 focused navigation tests pass after the rebase.

iOS Release preview for iPad testing, queued from eddb8f80a92. Uses the internal preview profile, includes the registered iPad in its signing profile, and contains the Screens v5 fork with native iPad columns. The Duo layer is excluded. The first cloud attempt stopped before compilation because the local native dependency fingerprint was stale. After a clean dependency install, the local fingerprint exactly matches the cloud fingerprint, cfa1a47f51bd87d119b60920b5b66f013e16c57c; the replacement preview uses that runtime. Physical iPad testing should cover sidebar and inspector transitions, keyboard/draft retention, sheets, rotation and multitasking.

Built with GPT-6.1 Sol in the Codex harness.

Trackpad scrolling follow-up: the native Gesture Handler patch rejects vertically dominant indirect pans before a horizontal row swipe can cancel the list. Horizontal trackpad swipes and the direct-touch preflight remain available. The iPadOS 26.5 simulator build and touch-scroll check passed. Seven probes against the compiled native recognizer passed with supplied trackpad translations, including vertical drift below the failure threshold, both horizontal directions, and the unchanged direct-touch path. Physical iPad testing confirmed the trackpad scrolling fix.

Latest signed iPad preview: install the trackpad scrolling candidate, built from ec840f1. Prepared with GPT-6.1 Sol in the Codex harness.

iPad workspace follow-up: apply 8-point horizontal content padding to HomeScreen when it owns the native primary column. The earlier inset change targeted ThreadNavigationSidebar, which is used by the JavaScript split layout rather than the native v5 column; that unused change was reverted. Selected-card spacing is now verified in light mode on iPadOS 26.5. Follow the adaptive route presentation so project selection, drafts, Settings, and Settings subpages stay in the secondary column when presented as cards. Compact iOS form sheets still use the overlay stack. Verified the project picker, draft, and Settings beside the sidebar on iPadOS 26.5; all 28 focused navigation tests and the mobile typecheck pass. React Doctor found only existing maintainability warnings.

Published the iOS preview update with the same native runtime as the signed trackpad preview, so no new installation is needed. Prepared with GPT-6.1 Sol in the Codex harness.

Latest corrected sidebar iOS preview update, verified with a selected card in light mode. Both v5 and the restacked Duo mobile typechecks pass.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 19, 2026
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Sep 19, 2026
@juliusmarminge
juliusmarminge added this pull request to stack #12649 September 19, 2026 22:56
@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −20 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.0 KiB 7.1 KiB +20 B (+0.3%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.5 KiB 6.4 KiB −40 B (−0.6%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.3 KiB 56.2 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.6 KiB +42 B (+0.3%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +37 B (+0.6%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.1 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 9 10 +1 (+11.1%) 21 ✅

Baseline: 408ff8a · PR result: 4328f94 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge force-pushed the mobile/rns-v5-migration branch 2 times, most recently from dfbc6ea to c951fb0 Compare September 30, 2026 18:05
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
@juliusmarminge
juliusmarminge force-pushed the mobile/rns-v5-migration branch from 01b5919 to eddb8f8 Compare October 1, 2026 08:09
An error occurred while trying to automatically change base from mobile/sdk58-android-foreground-alerts to mobile/sdk58-expo-modules-2 October 1, 2026 17:51
@juliusmarminge
juliusmarminge force-pushed the mobile/rns-v5-migration branch from eddb8f8 to 2e01d2a Compare October 1, 2026 20:02
@juliusmarminge
juliusmarminge removed this pull request from stack #12649 October 1, 2026 20:03
@juliusmarminge
juliusmarminge changed the base branch from mobile/sdk58-android-foreground-alerts to main October 1, 2026 20:03
@juliusmarminge
juliusmarminge added this pull request to stack #14645 October 1, 2026 20:03
@juliusmarminge

Copy link
Copy Markdown
Member Author

Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition.

The patch conflicts with the rewrite in apps/mobile/src/features/home/HomeRouteScreen.tsx, apps/mobile/src/features/home/HomeScreen.tsx. Even where the conflict is small enough to rebase, we are asking for fresh PRs against the new base so we can review and verify the behavior in V2.

Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant